package com.seu.spring.simple.aop;

import java.lang.reflect.Proxy;

/**
 * 简易AOP代理工厂：基于JDK代理实现
 *
 * @author liangfeihu
 * @since 2018/12/27
 */
public class SimpleAOP {
    public static Object getProxy(Object bean, Advice advice) {
        return Proxy.newProxyInstance(SimpleAOP.class.getClassLoader(),
                bean.getClass().getInterfaces(), advice);
    }
}
